1. Field of the Invention
The present invention relates to data transmission in a wireless communication network and, more particularly, to a method and a system for transmitting data between a mobile station and a server in an efficient and reliable manner.
2. Description of the Related Art
The Wireless Application Protocol (WAP) has been developed to address the needs of the mobile stations as these devices have severe physical, memory and processing constraints. WAP is applicable to a number of different systems including GSM-900, GSM-1800, GSM-1900, CDMA IS-95, TDMA IS-136, wide-band IS-95 and third generation systems such as IMT-2000, UMTS and W-CDMA.
Pursuant to WAP, there are three classes of transactions: Class 0 for unreliable one way requests, Class 1 for reliable one-way requests, and Class 2 for reliable two-way request-response transactions. A transaction is defined as a unit of interaction between an “initiator” (e.g., a sender or a receiver) and a “responder” (e.g., a sender or a receiver). A transaction begins with an invoke message generated by the sender. In class 2 transactions, the receiver replies with one result message that implicitly acknowledges the invoke message. If the receiver takes longer than a specified time interval to service the invoke message, the receiver may reply with a “hold on” acknowledgement message before transmitting the result message so as to avoid the retransmission of the invoke message. The transaction ends when the sender receives the acknowledgement.
If the length of a message exceeds the maximum size specified by a bearer (e.g., a telephone company), then before the message is sent, it is segmented into an ordered sequence of data packets. Each data packet has a packet sequence number (PSN) assigned thereto. Thus, for example, the first segmented data packet is assigned a packet sequence number of zero, the second data packet is assigned a packet sequence number of one, the third data packet is assigned a packet sequence number of two, and so on. The data packets are transmitted individually or in groups, and then re-assembled by the receiver upon receipt. The maximum number of packets a message can be segmented is about 256 packets, each packet having a maximum size of 1 to 2 Kbytes. Thus, the maximum size of a message is typically less than 0.5 Mbytes.
In the case where the data packets are segmented into groups, the sender does not send any new packets belonging to the same transaction until receipt of the previous packet groups has been acknowledged. In other words, packet groups are sent according to a stop-and-wait protocol. Typically, the sender determines the number of packets in each packet group and transmits the packets of a packet group in one batch. The last data packet of each packet group has a Group Trailer (GTR) flag set and is often referred to as the GTR packet. The last data packet of the last packet group of the entire message has the Transmission Trailer (TTR) flag set and is also referred to as the TTR packet. The receiver stores all packets received and upon receipt of the GTR packet, the receiver checks whether it has received all packets belonging to that particular packet group. If it has received all of the packets in that group, the receiver returns an acknowledgement message containing the packet sequence number of that GTR packet. If, however, the GTR or TTR packet is received and one or more packets of the packet group are missing, the receiver waits for a period of time, e.g., ½ the median round-trip time (RTT), before transmitting a negative acknowledgement (NACK) message containing the packet sequence numbers of the missing packets of that particular packet group. If the sender does not receive an acknowledgement within a specified time interval after transmission of a packet group, it retransmits only the GTR or TTR packet of that packet group to the receiver.
Problems arise, however, as one or more of the acknowledgement or negative acknowledgement messages are lost during transmission due to, for example, handover errors or congestion in the wireless communication network, thereby resulting in the retransmission of data packets that the receiver has already received.